<template>
    <span>
      <el-tooltip v-if="phone" effect="dark" :content="phone" placement="top">
        <span>{{ phone && (phone.substr(0, 4) + phone.substr(4).replace(/./g, '*')) }}</span>
      </el-tooltip>
      <span v-else></span>
    </span>
</template>

<script>
    export default {
      name: 'hide-phone-num',
      props: {
        phone: {
          type: String,
          default: '',
        },
      }
    };
</script>

<style scoped>

</style>
